package com.kb.design.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.kb.design.common.ApiResponse;
import com.kb.design.entity.DesignProgress;
import com.kb.design.service.DesignProgressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/designProgress")
public class DesignProgressController {

    @Autowired
    private DesignProgressService designProgressService;

    /**
     * 进度保存
     * @param designProgress
     * @return
     */
    @PostMapping("/save")
    public ApiResponse save(@RequestBody DesignProgress designProgress) {
        designProgressService.insert(designProgress);
        return ApiResponse.success("新增成功");
    }
    @PostMapping("/queryProgressList")
    public ApiResponse queryProgressList(@RequestBody DesignProgress designProgress) {
        return ApiResponse.success(designProgressService.queryProgressList(designProgress));
    }

    /**
     * 删除进度
     * @param designProgress
     * @return
     */
    @PostMapping("/del")
    public ApiResponse del(@RequestBody DesignProgress designProgress) {
        return ApiResponse.success(designProgressService.del(designProgress));
    }

}
